IOUtils
Functions
Copy everything in the source folder to the destination directory. Does not copy the src directory itself, only the content.
Copy the contents of a folder into another.
Copy all of the bytes from one inputstream to another, returning the number of bytes copied. This does not close or flush the streams when finished.
Delete a file immediately. If the operation doesn't succeed, try to delete it on exit.
Delete recursively a directory and all its content.
Returns whether a directory is empty or not.
Reads and returns the all of the bytes from the given filename
Read a single line from the given InputStream, assuming the text is UTF-8 encoded. Returns null if an EOF is found before a newline character.
This method will rename files matching oldName to newName in the given dir
Atomically write the given data to the outputFile. This works by first writing to a temporary file and then using the File.rename() method to atomically move that file into place. It is a good idea to put a synchronized block around any code that calls this for the same file.
Atomically write the given string to the outputFile in UTF8. This works by first writing the UTF-8 converted bytes to a temporary file and then using the File.rename() method to atomically move that file into place. It is a good idea to put a synchronized block around any code that calls this for the same file.
Recursively zip the given file or directory, only adding files matching the filter (if any).